package com.shop2cn.app.liveseller.testcase;

import java.util.List;
import java.util.Map;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.*;
import com.ymt.utils.tag.*;
import com.ymttest.utils.TestDataManager;
import com.shop2cn.app.liveseller.parameter.*;
import com.shop2cn.app.liveseller.service.*;
import com.ymttest.business.service.AuthCallServiceV2;
import com.ymttest.business.service.LiveRoomShop2cnCallService;
import com.ymttest.business.service.shenqi.GodmchManageCallService;
import com.ymttest.database.model.livesellerShop2cn.*;
import com.ymttest.database.sqlwapper.livesellerShop2cn.LiveRoomShop2cnWapper;
/**
*FreeMaker Template自动生成代码
*/
@TestSuite
@Ignore
public class Ts_GetDisconnectedLive{
	private static GetDisconnectedLiveCall GetDisconnectedLiveCall;
	private static int sellerId ;
	private static String token ;
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("获取买手异常断开的直播");
		try {
			sellerId = GodmchManageCallService.CreateSellerMch();
			token=AuthCallServiceV2.createToken(sellerId, "app");
		} catch (Exception e) {
			e.printStackTrace();
		}
		
	}

	@Before
	public void caseUp() {
		GetDisconnectedLiveCall=new GetDisconnectedLiveCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(GetDisconnectedLiveCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_GetDisconnectedLive_001() {
		Logger.start(true,"获取买手异常断开的直播成功");
		try {
//			GetDisconnectedLiveBean.setUserId(1);
			GetDisconnectedLiveCall.setData("{}");
			String head="accesstoken="+token;
			Logger.debug("ymt-pars:"+ head);
			GetDisconnectedLiveCall.addHeader("ymt-pars", head);
			GetDisconnectedLiveCall.callService();			
//			liveDto
			Logger.verifyNotNull(GetDisconnectedLiveCall.getReturnData(), "返回非空");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}